﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace OASystem.Controllers
{
    public class RoleController : Controller
    {
        


        public ActionResult Index(int id)
        {
            ViewBag.UserId = id;
            //根据当前UserId查询该员工之前是否有分配过角色
           ViewBag.roleList =  BLL.RoleManager.QueryListByUserId(id);
            return View();
        }


        public JsonResult Insert(string RoleIds, int UserId)
        {
            var result = new BLL.RoleManager().Add(RoleIds, UserId);

            return Json(result);
        }

    }
}
